/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Arrays;

/**
 * <p>Project: app2022 - Arr3
 * <p>Powered by webrx On 2022-01-08 15:44:05
 *
* @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Arr3 {
    public static void main(String[] args) {
        var ss = "java,html,javascript,mysql,redis".split(",");
        System.out.println(ss.length);
        //输出mysql
        System.out.println(ss[3]);
        //遍历数组，把所有的元素全部显示出
        System.out.println(ss);
        System.out.println(Arrays.toString(ss));
        for (String str : ss) {
            System.out.println(str);
        }
        for (int i = 0; i < ss.length; i++) {
            System.out.println(ss[i]);
        }
        for (int i = ss.length - 1; i >= 0; i--) {
            System.out.println(ss[i]);
        }
        //System.out.println("-".repeat(50));
        //Arrays.stream(ss).filter(e -> e.contains("java")).forEach(System.out::println);
    }
}
